<!DOCTYPE html>
<html>

	<head lang="en">
		<title>找攻略</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
		<script src="/js/jquery/jquery.min.js"></script>
		<script src="/js/bootstrap/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/css/reset.css" />
		<link rel="stylesheet" href="/css/strategy.css" />
		<script src="/js/plugins/jrender/jrender.min.js"></script>
		<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
		<script src="/js/plugins/dialog2/dialog.min.js"></script>
		<script>
            $(function () {
				$.get("/strategies/wish",function (data) {
					$("#wishDream").renderValues({list1:data.list1,list2:data.list2},{
                        setHref: function (item, value) {
                            $(item).attr("href",$(item).attr("href") + value);
                        }
					});


                    $(".wishBtn").click(function () {
						var id = $(this).data("id");
                        console.log(id);
                        $.post("/strategies/" + id + "/wish", {state: 2}, function (item) {
                            window.location.reload();
                        })
                    })
                })
            })
		</script>
	</head>

	<body>

	<div class="search-head">
		<div class="row nav-search">
			<div class="col-2">
				<a href="/mine/profiles.html">
					<span><i class="fa fa-chevron-left fa-2x"></i></span>
				</a>
			</div>
		</div>
	</div>
	<h3 style="color: #1e7e34">我的心愿单</h3>
	<div id="wishDream">
		<h6>未完成心愿</h6>
		<div>
			<div class="row hot" render-loop="list1">
				<div class="col-4">
					<a href="/strategyCatalogs.html?strategyId=" render-fun="setHref" render-key="list1.id">
						<img render-src="list1.coverUrl">
						<p render-html="list1.title"></p>
					</a>
					<button class="wishBtn" render-fun="setHref" render-attr="data-id=list1.id">已完成</button>
				</div>
			</div>
		</div>

		<hr>
		<h6>已完成心愿</h6>
		<div>
			<div class="row hot" render-loop="list2">
				<div class="col-4">
					<a href="/strategyCatalogs.html?strategyId=" render-fun="setHref" render-key="list2.id">
						<img render-src="list2.coverUrl">
						<p render-html="list2.title"></p>
					</a>
				</div>
			</div>
		</div>
	</div>

	</body>

</html>